package com.sui.bigdata.flink.sql.function.util;

import java.util.*;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author caokaizhi
 * @date 2019-09-02 12:42
 * @description
 * @reviewer
 */
public class PhoneHHIAccum {
    private Map<String,Integer> groups =  new ConcurrentHashMap<>();
    private int count = 0;
    private Set<String>  repetition=new HashSet<>();

    public Set<String> getRepetition() {
        return repetition;
    }

    public void setRepetition(Set<String> repetition) {
        this.repetition = repetition;
    }

    public Map<String, Integer> getGroups() {
        return groups;
    }

    public void setGroups(Map<String, Integer> groups) {
        this.groups = groups;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public Boolean exitsPhone(String val) {
        return this.repetition.contains(val)?true:false;
    }

    public void addphone(String val) {
        this.repetition.add(val);
    }
}
